package cn.stylefeng.guns.modular.hp.domain;

/**
 * <p>
 * 通用模块DO
 * </p>
 *
 * @author xzqiang
 * @date 2018-12-08
 */
public class ModularDO implements Comparable {

	private String code;
    private String name;

    public ModularDO(){}

	public ModularDO(String code, String name){
    	this.code = code;
    	this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public int compareTo(Object o) {
		if(o instanceof ModularDO){
			ModularDO emp = (ModularDO) o;
			return this.code.compareTo(emp.code);
        }
        return 0;
	}
}
